package com.sysmanage.etl.model;

import java.io.Serializable;
import java.util.Date;
import java.util.HashSet;
import java.util.Set;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.OneToMany;
import javax.persistence.Table;

@Entity
@Table(name = "ETL_EXCEL")
public class ETL_Excel implements Serializable {
	private static final long serialVersionUID = 574882181822895484L;

	private Integer excel_id;
	private String excel_name;
	private Date excel_uploadTime = new Date();
	private String excel_filePath;
	private Integer excel_rowIndex;
	private Integer shop_id;
	private String result;
	private Integer status;
	private Integer user_id;

	private Set<ETL_ErrorLog> errorLogs = new HashSet<ETL_ErrorLog>(0);

	@Id
	@GeneratedValue
	@Column(name = "EXCEL_ID")
	public Integer getExcel_id() {
		return excel_id;
	}

	public void setExcel_id(Integer excel_id) {
		this.excel_id = excel_id;
	}
	@Column(name = "EXCEL_NAME")
	public String getExcel_name() {
		return excel_name;
	}

	public void setExcel_name(String excel_name) {
		this.excel_name = excel_name;
	}
	@Column(name = "EXCEL_UPLOADTIME")
	public Date getExcel_uploadTime() {
		return excel_uploadTime;
	}

	public void setExcel_uploadTime(Date excel_uploadTime) {
		this.excel_uploadTime = excel_uploadTime;
	}
	@Column(name = "EXCEL_FILEPATH")
	public String getExcel_filePath() {
		return excel_filePath;
	}

	public void setExcel_filePath(String excel_filePath) {
		this.excel_filePath = excel_filePath;
	}
	@Column(name = "EXCEL_ROWINDEX")
	public Integer getExcel_rowIndex() {
		return excel_rowIndex;
	}

	public void setExcel_rowIndex(Integer excel_rowIndex) {
		this.excel_rowIndex = excel_rowIndex;
	}
	@Column(name = "SHOP_ID")
	public Integer getShop_id() {
		return shop_id;
	}

	public void setShop_id(Integer shop_id) {
		this.shop_id = shop_id;
	}
	@Column(name = "STATUS")
	public Integer getStatus() {
		return status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

	@OneToMany(mappedBy = "excel")
	public Set<ETL_ErrorLog> getErrorLogs() {
		return errorLogs;
	}

	public void setErrorLogs(Set<ETL_ErrorLog> errorLogs) {
		this.errorLogs = errorLogs;
	}
	@Column(name = "RESULT")
	public String getResult() {
		return result;
	}

	public void setResult(String result) {
		this.result = result;
	}
	
	@Column(name = "USER_ID")
	public Integer getUser_id() {
		return user_id;
	}

	public void setUser_id(Integer user_id) {
		this.user_id = user_id;
	}
}
